const Service = require('egg').Service;
class ZhhService extends Service {
    async caipudata(title) {

        // console.log(title.title);
        const sql = `SELECT * FROM zhh WHERE TYPE='${title.title}' AND content="类"`
        const data = await this.app.mysql.query(sql);
        return data;
    };
    async caipufenleidata(title) {

        // console.log(title);
        const sql = `SELECT * FROM zhh WHERE dishes='${title.titleData}'`
        const data = await this.app.mysql.query(sql);
        return data;
    };
    async motaisousuo(title) {

        console.log(title);
        const sql = `SELECT * FROM cook WHERE title='${title.titleData}'`
        const data = await this.app.mysql.query(sql);
        return data;
    }
    

}

module.exports = ZhhService;